package cn.swu.ws;
import java.sql.*;
public class DBTool {
   public static Connection getConnection() throws ClassNotFoundException, SQLException {
       String dburl="jdbc:mysql://localhost:3306/bookstore";
       String dbuser="root";
       String dbpassword="admin";
       Class.forName("com.mysql.cj.jdbc.Driver");
       return DriverManager.getConnection(dburl,dbuser,dbpassword);
   }
}
